#ifndef TABULEIRO_H_
#define TABULEIRO_H_

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include "rtc.h"
#include "video-text.h"
#include "video-graphics.h"
#include "sprite.h"
#include "timer.h"
#include "ints.h"
#include "kbc.h"
#include "queue.h"
#include "GQueue.h"
#include "util.h"
#include "definitions.h"
#include "pixmap.h"

//Diamonds
void printDiamond(char* video, Colors color, int x, int y);
void clearDiamond(char* video, Colors color, int x, int y);
void moveDiamond(char* video, int old_i,int old_j, int new_i, int new_j);
void destroyDiamond(char* video, int i, int j);
void selectDiamond(int i, int j);
void unselectDiamond(int i, int j);
void chooseDiamond(int i, int j);
void swapDiamonds(int old_i, int old_j, int new_i, int new_j);

//Matriz
void generateMatriz();
void printMatriz();
void printMatrizGUI(char* video);
Colors getColor(int i, int j);
void setColor(int i, int j, Colors color);
int countPossibleMoves();
int verifyCombinations();
void explodeCombinations();
void bringPiecesDown();
void insertNewPieces();
int movePiece(int old_i,int old_j, int new_i, int new_j);
void destroyDiamondsColor(Colors color);

#endif /* TABULEIRO_H_ */
